package Database;

import java.sql.*;

import javax.naming.spi.DirStateFactory.Result;
import javax.swing.JOptionPane;

public class BmiDetail {

	public BmiDetail(String detail){
		try{
			Class.forName("com.mysql.jdbc.Driver");
			Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/bmi","root","1234"); 
			Statement statement = con.createStatement();
			ResultSet rs = statement.executeQuery("SELECT * FROM `level`");
            if (rs.next()) {
                System.out.println(rs.getString(1)+" "+rs.getString(2));
            }
			statement.close();
			con.close();
		}catch (Exception e) {
			JOptionPane.showMessageDialog(null,e);
		}
	}
}
